package com.aiit.service.impl;

import com.aiit.mapper.DepartmentMapper;
import com.aiit.pojo.Department;
import com.aiit.service.DepartmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: LuTao
 * @Date: 2022/04/29/21:45
 */
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department>
                       implements DepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public int department(Department department) {
        return departmentMapper.department(department);
    }

    @Override
    public List<Department> getAllByDepartments() {
        return departmentMapper.getAllByDepartments();
    }
}
